<?php use_stylesheet('task.css') ?>
<?php use_helper('Text') ?>
<div id="task">
  <h1 style="background-color:#FFCC66"><?php echo "priority: ".$task->getPrioritytype() ?></h1>
  <h2><?php echo "status: ".$task->getTaskstatus() ?></h2>
  <h3>Summary: <span style="font-weight:normal;"><?php echo $task->getShortsummary() ?></span><br/>
    <small> - <?php echo "assigned to: ". $task->getResource()->getName() ?></small>
  </h3>
 
  <div class="description">
    <?php echo simple_format_text($task->getDescription()) ?>
  </div>
 
  <h4>Notes</h4>
  <?php 
  $notes = $task->getRelatedNotes(); 
  if ($notes->count()==0){
    ?><p class="note_detail"><small><?php echo "There are no notes against this task" ?></small></p><?php
  }
  ?>
  <table>
  	<?php foreach ($notes as $i => $note): ?>  
      <tr class="<?php echo fmod($i, 2) ? 'even' : 'odd' ?>">
        <td><p class="note_detail"><?php echo $note->getNotedetail(); ?></p>
        <div class="meta">
          <small>created on <?php echo $note->getDateTimeObject('createdate')->format('m/d/Y') ?>: by <?php echo $note->getResource()->getName()?></small>
        </div>
        </td>
      </tr>
    <?php endforeach; ?>
 </table>
 <hr/>
 
  <div class="meta">
    <small>created on <?php echo $task->getDateTimeObject('createdate')->format('m/d/Y') ?></small>
  </div>
 
  <div style="padding: 20px 0">
    <a href="<?php echo url_for('task/edit?taskid='.$task->getTaskid()) ?>">
      Edit
    </a>&nbsp;<a href="<?php echo url_for('task/index') ?>">List</a>
  </div>
</div>